<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <title>Document</title>
</head>

<body>
    <form>
        <div class="input-group input-group-search" style="margin-left:-8px">
            <input type="text" class="form-control ng-pristine ng-valid" placeholder="输入服务名称搜索">
            <span class="input-group-btn">
                <button class="btn btn-default" type="submit" onclick="getPageData(1)">
                    <span class="search"><span class="fa fa-search"></span>&nbsp;&nbsp;搜索</span>
                </button>
            </span>
        </div>
    </form>
    <script>
        function getPageData() {
            alert(123)
        }
        <!DOCTYPE html>

<head>

<title>递归分形树（一）</title>

</head>

<body>

<canvas id="myCanvas" width="600" height="400" style="border:3px double #996633;">

</canvas>

<script type="text/javascript">

   var canvas = document.getElementById('myCanvas');

   var ctx = canvas.getContext('2d');

   var maxdepth =4;

   var curdepth = 0;

   var alph=Math.PI/4;

   function growtree()

   {

       ctx.translate(300,380);

       branch(-Math.PI/2);

    }

    function branch(angle)

    {

        curdepth++;

        ctx.save();

        ctx.strokeStyle = "green";

        ctx.lineWidth = 6;

        ctx.rotate(angle);

        ctx.beginPath();

        ctx.moveTo(0,0);

        ctx.lineTo(100,0);

        ctx.stroke();

        ctx.translate(100,0);

        ctx.scale(0.75,0.75);

        if(curdepth <= maxdepth)

        {

            branch(alph);

            branch(-alph);

        }

        ctx.restore();

        curdepth--;

   }

   growtree();

</script>

</body>

</html>
    </script>
</body>

</html>